﻿@using Himall.Core;
@model Himall.Model.AccountInfo
<script src="~/Scripts/jquery.hiMallDatagrid.js"></script>
<script src="~/Scripts/jquery.himallLinkage.nocreate.js"></script>
<script src="~/Scripts/jquery.placeholder.min.js"></script>
<script src="~/Scripts/bootstrap.autocomplete.js"></script>
<script src="~/Areas/Admin/Scripts/accountDetailManagement.js"></script>
<div class="container">
    <ul class="nav nav-tabs-custom clearfix">
        <strong>结算</strong>
        <li class="active"><a>明细</a></li>
        <em class="primary-btn">
            <span class="glyphicon glyphicon-question-sign"></span>
            <div class="primary">
                <h3>温馨提示：</h3>
                <span>*</span><p>店铺的结算明细都将显示在这里</p>
            </div>
        </em>
    </ul>

    <h3 class="table-hd"><span class="total-account">本期应结： <b>￥@Model.AccountAmount</b> (@Model.StartDate.ToShortDateString() - @Model.EndDate.AddMilliseconds(-1).ToShortDateString())</span></h3>
    <table id="list" class="table"></table>

</div>

<script type="text/javascript">
    $(function () {
        $("#List").hiMallDatagrid({
            url: '../DetailList',
            nowrap: false,
            rownumbers: true,
            NoDataMsg: '没有找到符合条件的数据',
            border: false,
            fit: true,
            fitColumns: true,
            pagination: true,
            idField: "Id",
            pageSize: 15,
            pagePosition: 'bottom',
            pageNumber: 1,
            queryParams: { shopId: "@Model.ShopId", startDate: "@Model.StartDate", endDate: "@Model.EndDate" },
            columns:
            [[
                { field: "OrderId", title: "订单", width: 120, align: "left" },
                { field: "OrderAmount", title: "商品实付金额", width: 120, align: "left" },
                { field: "CommissionAmount", title: "佣金", width: 120, align: "left" },
                { field: "RefundTotalAmount", title: "退单金额", width: 120, align: "left" },
                { field: "RefundCommisAmount", title: "退还佣金", width: 120, align: "left" },
                { field: "AccountAmount", title: "最终结算", width: 120, align: "left" },
                { field: "Date", title: "时间", width: 180, align: "left" },
            ]]
        });
    });
</script>